import time

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.binary_location = r"D:\work\soft\Chrome\Application\chrome.exe"
driver = webdriver.Chrome(options=chrome_options)
driver.get("https://www.7k7k.com/")
# xiao=driver.get_window_size() #页面尺寸
# print(xiao)
driver.maximize_window()
# da=driver.get_window_size()
# print(da)
# w=driver.find_element_by_id('smart_input')
# time.sleep(1)
# w.send_keys('造梦西游3')
# time.sleep(1)
# w.submit()


# w=driver.find_element(By.ID,value='smart_input')
# time.sleep(1)
# w.send_keys('屁王兄弟')


# w=driver.find_element(By.NAME,value='k')
# time.sleep(1)
# w.send_keys('海绵宝宝')
# time.sleep(1)
# w.submit()


# w=driver.find_element(By.CLASS_NAME,value='sh text')
# time.sleep(1)
# w.send_keys('弹弹堂')
# time.sleep(1)
# w.submit()

# w=driver.find_element(By.XPATH,'//*[@id="header"]/div[2]/div/form/input')
# w.send_keys('冒险王')
# time.sleep(1)
# w.submit()

# w=driver.find_element_by_link_text('坦克')
# time.sleep(1)
# w.click()
# w=driver.find_element_by_partial_link_text('权力的')
# time.sleep(1)
# w.click()

# w=driver.find_element_by_xpath('/html/body/div[2]/div[2]/div[2]/div[2]/div[2]/a[1]/div/img')
# time.sleep(1)
# w.click()

# w=driver.find_element_by_xpath('//*[@id="theme-blue"]/div[2]/div[2]/div[2]/div[2]/div[2]/a[1]/div/img')
# time.sleep(1)
# w.click()

# w=driver.find_element_by_xpath('//*[@id="theme-blue"]/div[2]/div[2]/div[2]/div[6]/div[2]/a[18]/div/img')
# time.sleep(3)
# js="window.scrollTo(0,3000)"
# driver.execute_script(js)
# time.sleep(3)
# w.click()

# w=driver.find_element_by_xpath('//*[@id="header"]/div[2]/div/form/input')
# w.send_keys('我的世界')
# driver.find_element_by_xpath('//*[@id="header"]/div[2]/div/form/span').click()

# w=driver.find_element_by_xpath("//div[@id='header' and @class='header']//span[text()='登录']")
# time.sleep(1)
# w.click()

# w=driver.find_element_by_xpath("//span[text()='登录']")
# time.sleep(1)
# w.click()

# w=driver.find_element_by_xpath("//*[@id='header']/div[1]/div/div[2]/div[1]/div[1]/span")
# time.sleep(1)
# w.click()

w=driver.find_element_by_xpath("//div[@class='header' and @id='header']//form/input")
w.send_keys('米拉奇')
time.sleep(1)
# h=driver.find_element_by_xpath("//div[@class='header' and @id='header']//span[text()='搜 索']")
h=driver.find_element_by_xpath("//span[text()='搜 索']")
h.click()
time.sleep(60)
driver.quit()
